package cn.tedu.boot43.mapper;

import cn.tedu.boot43.entity.Emp;
import org.apache.ibatis.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Mapper
public interface EmpMapper {
   @Insert("insert into newemp values(null,#{name},#{job},#{sal})")
    void insert(Emp emp);

   @Select("select * from newemp")
    List<Emp> select();

   @Delete("delete from newemp where id=#{id}")
    void delete(int id);

   @Update("update newemp set name=#{name},job=#{job},sal=#{sal} where id=#{id}")
    void update(Emp emp);
}
